home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
LANG
/
SML40
/
!Sml
/
Sml
/
compstuff
/
hc
/
dumpcode
< prev
next >
Wrap
Text File
|
1990-09-17
|
7KB
|
494 lines
#ifdef DEBUGinterp
char opstrings[][40] = {
"OpTrouble",
"OpGetFreeW",
"OpTuple_0",
"OpTrue",
"OpFalse",
"OpInt",
"OpNo"Op",
"OpExport",
"OpImport",
"OpNewSubscr",
"OpVar0",
"OpVar1",
"OpTuple",
"OpVariant",
"OpRef",
"OpFst",
"OpSnd",
"OpHd",
"OpTl",
"OpNull",
"OpOutl",
"OpOutr",
"OpIs0",
"OpIs1",
"OpQuaDot",
"OpNewUpdate",
"OpQuaIs",
"OpQuaAs",
"OpDestVariant",
"OpCase",
"OpNot",
"OpAnd",
"OpOr",
"OpNeg",
"OpPlus",
"OpDiff",
"OpTimes",
"OpDivide",
"OpIntDiv",
"OpMod",
"OpEq",
"OpEqBool",
"OpEqInt",
"OpEqString",
"OpGreater",
"OpLess",
"OpGreatEq",
"OpLessEq",
"OpExplode",
"OpImplode",
"OpExpAscii",
"OpImpAscii",
"OpStringOfInt",
"OpIntOfString",
"OpAt",
"OpAssign",
"OpJumpW",
"OpTrueJumpW",
"OpFalseJumpW",
"OpExecute",
"OpClosure",
"OpDumClosure",
"OpRecClosure",
"OpGetLocalW",
"OpPop",
"OpIncRef",
"OpSqueezeW",
"OpDecRef",
"OpDestNil",
"OpReturn",
"OpSaveFrame",
"OpApplFrame",
"OpRestFrame",
"OpTailApply_n1",
"OpFunId",
"OpFunComp",
"OpNotImmed",
"OpPrintObj",
"OpUnTrap",
"OpStopProcess",
"OpTuple_2",
"OpCollect",
"OpPrintNull",
"OpPrintBool",
"OpPrintInt",
"OpPrintString",
"OpOutString",
"OpPrompt",
"OpSystem",
"OpSqueeze1",
"OpReturn1",
"OpTailApply_11",
"OpTailApply_0n",
"OpTailApplyW",
"OpGetLiteralW",
"OpStringLength",
"OpSubString",
"OpArray",
"OpSize",
"OpSubscr",
"OpUpdate",
"OpStringLEQ",
"OpStringLSS",
"OpStringGEQ",
"OpStringGTR",
"OpReadLine",
"OpLookahead",
"OpSmashProcess",
"OpListLength",
"OpOrd",
"OpMakeText",
"OpStoreTextByte",
"OpStoreTextWord",
"OpStoreTextLong",
"OpArrayOfList",
"OpBAFetch",
"OpBAStore",
"OpGetLoc0",
"OpGetLoc1",
"OpStringHash",
"OpEqRef",
"OpBpt",
"OpCurrentProcess",
"OpNewProcess",
"OpSuspendProcess",
"OpWaitForProcess",
"OpBigVar",
"OpXConClosure",
"OpIncRefAt",
"OpObjComp",
"OpDestBigVar",
"OpNewRaise",
"OpNewHandle",
"OpBind",
"OpScanStringWhileIn",
"OpScanStringUntilIn",
"OpVariantObject",
"OpClosure1",
"OpDumClosure1",
"OpSpawnProcess",
"OpRescheduleProcess",
"OpNewState",
"OpSmashState",
"OpCurrentState",
"OpWaitForProcesses",
"OpSynchronise",
"OpRandomMerge",
"OpExportCurrentState",
"OpMoveSubstring",
"OpStringOfLength",
"OpOldScanStringUntilIn",
"OpOldScanStringWhileIn",
"OpCpuTime",
"Op"OpenStream",
"OpCreateStream",
"OpReadStream",
"OpReadToString",
"OpWriteStream",
"OpCloseStream",
"OpInteractive",
"OpReturn0",
"OpDestTuple",
"OpDestTuple_n0",
"OpDestQCons",
"OpSlideW",
"OpChangeDir",
"OpNth",
"OpRev",
"OpTupleOfList",
"OpDestTuple_20",
"OpCurrClos",
"OpByteNum",
"OpFPlus",
"OpFDiff",
"OpFTimes",
"OpFDivide",
"OpFNeg",
"OpFEql",
"OpFGeq",
"OpFGtr",
"OpFLeq",
"OpFLss",
"OpReal",
"OpFloor",
"OpStringOfReal",
"OpRealOfString",
"OpPrintReal",
"OpDestInt",
"OpDestReal",
"OpCaseVal",
"OpTailApply_n0",
"OpDestString",
"OpPopTrap",
"OpGetLocalB",
"OpGetLiteralB",
"OpGetLiteral1",
"OpGetFreeB",
"OpGetFree1",
"OpSqueezeB",
"OpSlideB",
"OpTailApplyB",
"OpJumpB",
"OpFalseJumpB",
"OpTrueJumpB",
"OpDestTailApply",
"OpTrace",
"OpSqrt",
"OpSin",
"OpCos",
"OpArctan",
"OpExp",
"OpLn",
"OpFetchByte",
"OpUniqueStamp",
"OpStampOfFile",
"OpGetEnv",
"OpStoreByte",
"OpFlush",
"OpFUpPlus",
"OpFUpDiff",
"OpFUpTimes",
"OpFUpDivide",
"OpReRaise",
"OpRaiseMatch",
"INVALID_OPCODE"} ;
int opcode[] = {
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
82,
83,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
99,
100,
101,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
114,
115,
116,
117,
118,
119,
120,
121,
122,
123,
124,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
146,
147,
148,
150,
151,
152,
153,
155,
156,
157,
158,
159,
160,
161,
162,
163,
164,
165,
166,
167,
168,
169,
170,
171,
172,
173,
174,
175,
176,
178,
179,
180,
181,
182,
183,
184,
185,
186,
187,
188,
189,
191,
192,
193,
194,
195,
196,
197,
198,
199,
200,
201,
202,
203,
204,
206,
207,
208,
209,
210,
211,
212,
213,
214,
215,
216,
217,
218,
219,
220,
221,
222,
223,
224,
225,
226,
227,
228,
229,
230,
231,
232,
233,
234,
235,
253,
254,
-1 };
#include <stdio.h>
#include "bcodes.h"
#include "debug.h"
#define OPCODE(i) opcode[i]
#define OPSTRINGS(i) opstrings[i]
dumpcode()
{
int i;
int j;
FILE *OpFile ;
OpFile = fopen(OpNameFile,"w") ;
for (i=1;i<NumByteCodes;i++) {
for (j=0;(OPCODE(j)!=(-1));j++) {
if (i == OPCODE(j)) break ;
}
fprintf(OpFile,"Static %40.40s\t%d\t%d\n",OPSTRINGS(j),
OpcodeCount[i],i) ;
fprintf(OpFile,"Dynamic %40.40s\t%d\t%d\n",OPSTRINGS(j),
DynamicOpcodeCount[i],i) ;
}
fclose(OpFile) ;
}
#endif